import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/login/Login'
// import Loginpc from '@/components/login/Loginpc'
// import Registerpc from '@/components/login/Registerpc'

import messageview from '../components/message/MessageView'
import mediasubcomp from '../components/message/Mediasubcomp'

import connectview from '../components/connect/ConnectView'
import findview from '../components/find/FindView'
import mineview from '../components/me/MineView'
import minePersonInfoView from '../components/me/minePersonInfoView'
import ChatView from '../components/public/chatview/ChatView'
import ChatMessageView from '../components/public/chatview/ChatMessageView'
import imgview from '../components/public/chatview/ImgView'
import SearchView from '../components/public/searchview/SearchView'
import GroupChatView from '@/components/public/groupchat/GroupChatView.vue'
import GroupMessageView from '../components/public/groupchat/GroupMessageView'

import AddFriends from '../components/public/header/AddFriends'
import CreateGroup from '../components/connect/ConnectCreateGroupView'
import CreateLabel from '../components/connect/ConnectCreateLabelView'
import Group from '../components/connect/ConnectGroupView'
import ConnectLabelView from '../components/connect/ConnectLabelView'
import NewFriends from '../components/connect/ConnectNewFriendDetail'
import ConnectPerson from '../components/connect/ConnectPerson'

Vue.use(Router)

export default new Router({
  routes: [
    {path: '/', redirect: '/login'},
    // {path: '/login', component: Login, children: [{path: '/login/loginpc', component: Loginpc}, {path: '/login/registerpc', component: Registerpc}]},
    {path: '/login', component: Login},
    {path: '/messageview', component: messageview},
    {path: '/mediasubcomp', component: mediasubcomp},
    {path: '/connectview', component: connectview},
    {path: '/findview', component: findview},
    {path: '/mineview', component: mineview},
    {path: '/minepersoninfoview', component: minePersonInfoView},
    {path: '/chatview', component: ChatView},
    {path: '/searchview', component: SearchView},
    {path: '/imgview', component: imgview},
    {path: '/addfriends', name: 'addfriends', component: AddFriends},
    {path: '/creategroup', name: 'creategroup', component: CreateGroup},
    {path: '/createlabel', name: 'createlabel', component: CreateLabel},
    {path: '/group', name: 'group', component: Group},
    {path: '/groupchatview/:id', name: 'groupchatview', component: GroupChatView},
    {path: '/groupmessageview/:id', name: 'groupmessageview', component: GroupMessageView},
    {path: '/connectlabel', name: 'connectlabel', component: ConnectLabelView},
    {path: '/newfriends', name: 'newfriends', component: NewFriends},
    {path: '/connectperson/:jid', name: 'connectpersion', component: ConnectPerson},
    {path: '/chatmessageview/:name', component: ChatMessageView}
  ],
  linkActiveClass: 'active'
})
